<?php/* * Created on Jun 4, 2009 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */require_once ('Dao.php');require_once ('../model/story.php');class StoryTextLoader extends Dao{	const GET_TOP_STORIES_SQL = "select STORY_ID, STORY_TITLE, SHORT_TEXT, DATED, AUTHOR, FULL_TEXT from STORIES WHERE STORY_ID=?";	function getStoryText($storyId)	{		$stmt = $this->mysqli->prepare(self :: GET_TOP_STORIES_SQL);		$stmt->bind_param('s', $storyId);		$stmt->execute();		$storyId = null;		$storyTitle = null;		$shortText = null;		$dated = null;		$author = null;		$fullText = null;		$stmt->bind_result($storyId, $storyTitle, $shortText, $dated, $author, $fullText);		while ($stmt->fetch())		{			$story = new Story($storyId, $storyTitle, $dated, $author, $shortText,$fullText);		}		return $story;	}}?>
